<%@ taglib uri="http://www.ptc.com/windchill/taglib/fmt" prefix="fmt"%>
<%@taglib tagdir="/WEB-INF/tags" prefix="wctags"%>
<%@ page import="ext.acae2.document.resource.PackageResource"%>
<fmt:setLocale value="${localeBean.locale}" />
<fmt:setBundle basename="ext.acae2.document.resource.PackageResource" />
<fmt:message var="FILE_EXECUTE" key="<%= PackageResource.FILE_EXECUTE%>" />
<fmt:message var="CONFIRM" key="<%= PackageResource.CONFIRM%>" />
<fmt:message var="PROGRAM_EXECUTE_RESULT" key="<%= PackageResource.PROGRAM_EXECUTE_RESULT%>" />

<%
String serverName = request.getServerName();
String contextPath = request.getContextPath();
String scheme = request.getScheme();
String fullPath = scheme+"://"+serverName+contextPath;
%>

<script type="text/javascript">
programExecute = function(){
	document.getElementById("result").innerHTML = "loading......";
	document.getElementById("execute").disabled="disabled";
    var programForm = document.getElementById("programForm");
    document.programForm.action = "/Windchill/netmarkets/jsp/ext/acae2/document/programDoc/programCreateExecute.jsp";
    document.programForm.method = "post";
    document.programForm.submit();
}

msgCallBack = function(msg){
	document.getElementById("result").innerHTML=msg;
	document.getElementById("execute").disabled="";
}
</script>
<form id="programForm" name="programForm" method="post" action="/Windchill/netmarkets/jsp/ext/acae2/document/programDoc/programCreateExecute.jsp" enctype="multipart/form-data"  target="hidden_frame">
  <table>
	<tr>
	  <td><font style="font-weight: bold;">${FILE_EXECUTE }:</font></td>
	  <td><input type="file" name="programFile" id="programFile" />(.zip/.rar)</td>
	</tr>
</table>
<table width='50%' style='margin-left: 10%'>
	<tr>
		<td align="center" colspan="2"><input type="submit" onclick="programExecute()"
			value="${CONFIRM}" id="execute"/></td>
	</tr>
</table>
</form>

<iframe name="hidden_frame" id="hidden_frame" style="display:none">
</iframe>

<br>
<br>
<br>
<table>
	<tr>
		<td><font style="font-weight: bold;">${ PROGRAM_EXECUTE_RESULT}</font></td>
	</tr>
</table>
<div id="result" style="margin-left: 5%; font-weight: bold;"></div>





